Skip to content
This repository has been archived by the owner on Jan 28, 2024. It is now read-only.

Fix null inference weirdness #605

Merged
merged 1 commit into from
Aug 31, 2023
Merged

Fix null inference weirdness #605

merged 1 commit into from
Aug 31, 2023

Conversation

liamappelbe
Copy link
Contributor

The change to lib/src/config_provider/config_spec.dart in #601 only works on the very latest SDK snapshot. This will make it hard for people to contribute until it hits stable. Better to just rewrite the line to sidestep the inference.

@liamappelbe liamappelbe enabled auto-merge (squash) August 31, 2023 02:35
@liamappelbe liamappelbe merged commit 952483b into main Aug 31, 2023
6 checks passed
Copy link
Contributor

@dcharkes dcharkes left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm

Thanks @liamappelbe !

@@ -591,7 +591,7 @@ class StringConfigSpec<RE extends Object?> extends ConfigSpec<String, RE> {
if (!o.checkType<String>(log: log)) {
return false;
}
if (_regexp != null && !_regexp.hasMatch(o.value as String)) {
if (!(_regexp?.hasMatch(o.value as String) ?? true)) {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nit: does the ! bind stronger than the ??, I guess it does. Maybe add parenthesis.

@liamappelbe liamappelbe deleted the quick_fix branch August 31, 2023 17:47
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

2 participants